// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [

  {
    path: '/',
    name: 'report_out4_list.vue',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/dashboard/workplace',
    children: [
      // dashboard
      {
        path: '/dashboard',
        name: 'dashboard',
        redirect: '/dashboard/workplace',
        component: RouteView,
        hidden: true,
        //meta: { keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
        children: [
          /*  {
              path: '/dashboard/analysis',
              name: 'Analysis',
              component: () => import('@/views/dashboard/Analysis'),
              meta: { title: '分析页', keepAlive: false, permission: [ 'dashboard' ] }
            },
            // 外部链接
            {
              path: 'https://www.baidu.com/',
              name: 'Monitor',
              meta: { title: '监控页（外部）', target: '_blank' }
            },*/

          {
            path: '/dashboard/workplace',
            name: 'Workplace',
            component: () => import('@/views/dashboard/Analysis'),
            meta: { title: '首页', closable: false, keepAlive: true, permission: ['dashboard'] }
          }
        ]
      }
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @shopType { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import('@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import( '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import( '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },
  {
    path: '/approvl',
    component: BlankLayout,
    children: [
      {
        path: 'purseDetail100',
        name: 'purseDetail100',
        component: () => import( '@/views/approvl/purseDetail100')
      },
      {
        path: 'purseDetail200',
        name: 'purseDetail200',
        component: () => import( '@/views/approvl/purseDetail200')
      },
      {
        path: 'materials_list',
        name: 'materials_list',
        component: () => import( '@/views/approvl/materials_list')
      },
      {
        path: 'bmepDetail',
        name: 'bmepDetail',
        component: () => import( '@/views/approvl/bmepDetail')
      },
      {
        path: 'bmep100AddDetail',
        name: 'bmep100AddDetail',
        component: () => import( '@/views/approvl/bmep100AddDetail')
      },
      {
        path: 'bmep200AddDetail',
        name: 'bmep200AddDetail',
        component: () => import( '@/views/approvl/bmep200AddDetail')
      },
      {
        path: 'bmep100UpdateDetail',
        name: 'bmep100UpdateDetail',
        component: () => import( '@/views/approvl/bmep100UpdateDetail')
      },
      {
        path: 'bmep200UpdateDetail',
        name: 'bmep200UpdateDetail',
        component: () => import( '@/views/approvl/bmep200UpdateDetail')
      },
      {
        path: 'bmpDetail',
        name: 'bmpDetail',
        component: () => import( '@/views/approvl/bmpDetail')
      },
      {
        path: 'bmp100AddDetail',
        name: 'bmp100AddDetail',
        component: () => import( '@/views/approvl/bmp100AddDetail')
      },
      {
        path: 'bmp100UpdateDetail',
        name: 'bmp100UpdateDetail',
        component: () => import( '@/views/approvl/bmp100UpdateDetail')
      },
      {
        path: 'bmp200AddDetail',
        name: 'bmp200AddDetail',
        component: () => import( '@/views/approvl/bmp200AddDetail')
      },
      {
        path: 'bmp200UpdateDetail',
        name: 'bmp200UpdateDetail',
        component: () => import( '@/views/approvl/bmp200UpdateDetail')
      },
      {
        path: 'reportOut1Detail',
        name: 'reportOut1Detail',
        component: () => import('@/views/approvl/reportOut1Detail')
      },
      {
        path: 'reportOut2Detail',
        name: 'reportOut2Detail',
        component: () => import( '@/views/approvl/reportOut2Detail')
      },
      {
        path: 'reportOut3Detail',
        name: 'reportOut3Detail',
        component: () => import( '@/views/approvl/reportOut3Detail')
      },
      {
        path: 'reportOut4Detail',
        name: 'reportOut4Detail',
        component: () => import( '@/views/approvl/reportOut4Detail')
      },
      {
        path: 'reportOut5Detail',
        name: 'reportOut5Detail',
        component: () => import('@/views/approvl/reportOut5Detail')
      },
      {
        path: 'reportDetail',
        name: 'reportDetail',
        component: () => import('@/views/approvl/reportDetail')
      }
    ]
  },
  {
    path: '/test',
    component: BlankLayout,
    redirect: '/test/home',
    children: [
      {
        path: 'home',
        name: 'TestHome',
        component: () => import('@/views/Home')
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]

